home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / contrib / harpoon.sty < prev    next >
Encoding:
Text File  |  1995-03-15  |  1.6 KB  |  43 lines

  1. % harpoon.sty
  2. % by Tobias Kuipers {kuipers@fwi.uva.nl}
  3. % v1.0 of 1994/11/02
  4. % See harpoon.tex for documentation
  5. % If you modify this file, please redistribute it under another name
  6. % and send me a copy
  7. %
  8. % Permission is hereby granted to do anything with this file. No fitness
  9. % for any purpose is guaranteed or implied. We deny everything
  10. %
  11. \NeedsTeXFormat{LaTeX2e}
  12. \ProvidesPackage{harpoon}[1994/11/02 Harpoon drawing package by Tobias Kuipers]
  13.  
  14. \DeclareOption*{%
  15.     \PassOptionsToPackage{\CurrentOption}{graphics}
  16. }
  17. \ProcessOptions
  18. \RequirePackage{graphics}[1994/05/30]
  19.  
  20.  
  21.  
  22. \newcommand{\overleftharp}[1]{\overharp{\leftharpoonup}{#1}{.7}}
  23. \newcommand{\overrightharp}[1]{\overharp{\rightharpoonup}{#1}{.7}}
  24. \newcommand{\overleftharpdown}[1]{\overharp{\leftharpoondown}{#1}{.9}}
  25. \newcommand{\overrightharpdown}[1]{\overharp{\rightharpoondown}{#1}{.9}}
  26. \newcommand{\underleftharp}[1]{\overharp{\leftharpoonup}{#1}{-1}}
  27. \newcommand{\underrightharp}[1]{\overharp{\rightharpoonup}{#1}{-1}}
  28. \newcommand{\underleftharpdown}[1]{\overharp{\leftharpoondown}{#1}{-.8}}
  29. \newcommand{\underrightharpdown}[1]{\overharp{\rightharpoondown}{#1}{-.8}}
  30.  
  31. \newlength{\argwd}  \newlength{\arght}%-Two variables
  32. \newcommand{\overharp}[3]{%        -The command name
  33.   \settowidth{\argwd}{#2}\settoheight{\arght}{#2}%
  34.   %                                    -Set the variables
  35.   \raisebox{#3\arght}{%                -Put the harp 6/10 of a line higher
  36.     \makebox[0pt][l]{%                 -Put everything in a box
  37.       \resizebox{\argwd}{.8\arght}{$#1$}% 
  38.       %                                -Set harp to right length
  39.     }%
  40.   }%
  41. #2}%                                   -Print the argument
  42.  
  43.